package com.biao.transaction.example.common.util;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biao.transaction.example.common.enums.PageSizeEnum;

/**
 * @description: 分页的工具类
 * @author:chenwenbiao
 * @createTime:2019/7/29 14:46
 * @Version：1.0
 **/
public class PageUtil<T> {


    public Page getPage(Integer currentPage){
        return getPage(currentPage, PageSizeEnum.TWENTY.getValue());
    }


    public Page getPage(Integer currentPage, Integer pageSize){
        Page<T> page = new Page<>();
        page.setCurrent(currentPage);
        page.setSize(pageSize);

        return page;
    }
}
